/**
 * @file ErrorCodes.h
 * @brief 错误代码定义
 */

#pragma once

namespace CLink
{
namespace Error
{

/**
 * @enum ErrorCode
 * @brief 错误代码枚举
 */
enum class ErrorCode
{
    // 通用错误 (0-999)
    SUCCESS = 0,
    UNKNOWN_ERROR = 1,
    INVALID_ARGUMENT = 2,
    NOT_IMPLEMENTED = 3,
    OPERATION_TIMEOUT = 4,

    // 网络错误 (1000-1999)
    NETWORK_ERROR = 1000,
    CONNECTION_FAILED = 1001,
    CONNECTION_TIMEOUT = 1002,

    // 认证错误 (2000-2999)
    AUTHENTICATION_FAILED = 2000,
    UNAUTHORIZED = 2001,
    TOKEN_EXPIRED = 2002,

    // 数据错误 (3000-3999)
    DATA_ERROR = 3000,
    DATA_NOT_FOUND = 3001,
    DATA_ALREADY_EXISTS = 3002,
    DATA_VALIDATION_FAILED = 3003,

    // 系统错误 (4000-4999)
    SYSTEM_ERROR = 4000,
    RESOURCE_EXHAUSTED = 4001,
    INTERNAL_ERROR = 4002
};

} // namespace Error
} // namespace CLink